Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix db object to not return deprecated variable #38920

Merged

Conversation

eileencodes
Copy link
Member

Calling db_config.config was deprecated in #37185 in favor of
db_config.configuration_hash. When returning the objects from
configurations we should ensure the object returns the non-deprecated
method.

Before:

<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007ff0f61696a0
@env_name="development", @name="primary", @config={:adapter=>"mysql2",
:database=>"recipes_development"}>

After:

<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007ff0f61696a0
@env_name="development", @name="primary", @configuration_hash={:adapter=>"mysql2",
:database=>"recipes_development"}>

Co-authored-by: John Crepezzi john.crepezzi@gmail.com

Calling `db_config.config` was deprecated in rails#37185 in favor of
`db_config.configuration_hash`. When returning the objects from
`configurations` we should ensure the object returns the non-deprecated
method.

Before:

```
<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007ff0f61696a0
@env_name="development", @name="primary", @config={:adapter=>"mysql2",
:database=>"recipes_development"}>
```

After:

```
<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007ff0f61696a0
@env_name="development", @name="primary", @configuration_hash={:adapter=>"mysql2",
:database=>"recipes_development"}>
```

Co-authored-by: John Crepezzi <john.crepezzi@gmail.com>
@eileencodes eileencodes merged commit 6d6d4b9 into rails:master Apr 10, 2020
@eileencodes eileencodes deleted the fix-object-to-use-non-deprecated-method branch April 10, 2020 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant